Imports System.Net
Imports System.Net.Sockets

Public Class GetPort

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim myURI As New Uri(TextBox6.Text)

        TextBox1.Text = myURI.Host
        TextBox2.Text = myURI.AbsolutePath
        TextBox3.Text = myURI.AbsoluteUri
        TextBox4.Text = myURI.Port.ToString
        TextBox5.Text = myURI.Scheme
    End Sub
End Class
